package yaty.lee.tencent.weibo.servlet;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class GetAuthrizationCodeServlet extends HttpServlet {

    private static final long serialVersionUID = -8616407262441709848L;
    private static final Logger log = Logger.getLogger(GetAuthrizationCodeServlet.class.getName());

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String access_token = req.getParameter("access_token");
        String expires_in = req.getParameter("expires_in");
        String openid = req.getParameter("openid");
        String openkey = req.getParameter("openkey");

        log.info("access_token: " + access_token + "\nexpires_in: " + expires_in + "\nopenid: " + openid + "\nopenkey: " + openkey);
    }
}
